home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / text / hyper / ADtoHT2_0.lha / MyLib.lha / string / strcmp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-14  |  339 b   |  29 lines

  1. #include <string.h>
  2.  
  3. /************************************************************************/
  4.  
  5. #undef strcmp
  6.  
  7. #ifdef __SASC_510
  8.  
  9. int strcmp(const char *s1, const char *s2)
  10.  
  11. {
  12.   return __builtin_strcmp(s1,s2);
  13. }
  14.  
  15. #else
  16.  
  17. int strcmp(const char *s1,const char *s2)
  18.  
  19. {
  20.   int r;
  21.  
  22.   while (!(r=*s1++-*s2) && *s2++)
  23.     ;
  24.  
  25.   return r;
  26. }
  27.  
  28. #endif
  29.